cmake_minimum_required(VERSION 2.8.3)
project(acupoint_transform)

set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
add_definitions(-std=c++11 -g -O1 -ftree-vectorize -march=native)

find_package(catkin REQUIRED COMPONENTS
    roscpp
    tf
    message_filters
    cv_bridge
    sensor_msgs
    image_transport
    message_generation
    std_msgs
    geometry_msgs
    acupoint_msgs
)


generate_messages(
  DEPENDENCIES
  std_msgs
  geometry_msgs
)

find_package(OpenCV REQUIRED)




find_package(yaml-cpp REQUIRED)
find_package(Boost REQUIRED)

catkin_package(
    CATKIN_DEPENDS message_runtime
)

find_package(PCL REQUIRED)


include_directories(
  ${catkin_INCLUDE_DIRS}
  ${YAML_CPP_LIBRARIES}
  ${BOOST_INCLUDE_DIRS}
  ${OpenCV_INCLUDE_DIRS}
  ${PCL_INCLUDE_DIRS}
)



find_package(Eigen3 REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIR})
add_definitions(${EIGEN_DEFINITIONS})

include_directories(${PROJECT_SOURCE_DIR}/include)



add_executable(aruco_detect_node src/aruco_detect_node.cpp)
add_dependencies(aruco_detect_node        ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} )
target_link_libraries(aruco_detect_node ${OpenCV_LIBS} ${catkin_LIBRARIES}  ${YAML_CPP_LIBRARIES})




add_executable(acu2camera_coordinate_node src/acu2camera_coordinate_node.cpp)
add_dependencies(acu2camera_coordinate_node        ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} )
target_link_libraries(acu2camera_coordinate_node ${OpenCV_LIBS} ${catkin_LIBRARIES} )


add_executable(acu2base_coordinate_node src/acu2base_coordinate_node.cpp)
add_dependencies(acu2base_coordinate_node        ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} )
target_link_libraries(acu2base_coordinate_node ${OpenCV_LIBS} ${catkin_LIBRARIES} )


add_executable(acupoint_pixel_filter_node src/acupoint_pixel_filter_node.cpp)
add_dependencies(acupoint_pixel_filter_node        ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} )
target_link_libraries(acupoint_pixel_filter_node ${OpenCV_LIBS} ${catkin_LIBRARIES} )


add_executable(acupoint_coordinate_filter_node src/acupoint_coordinate_filter_node.cpp)
add_dependencies(acupoint_coordinate_filter_node        ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} )
target_link_libraries(acupoint_coordinate_filter_node ${OpenCV_LIBS} ${catkin_LIBRARIES} )

add_executable(get_leg_line_coordinate_node src/get_leg_line_coordinate_node.cpp)
add_dependencies(get_leg_line_coordinate_node        ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} )
target_link_libraries(get_leg_line_coordinate_node ${OpenCV_LIBS} ${catkin_LIBRARIES} )

add_executable(acupoint3d_display_node src/debug/acupoint3d_display_node)
add_dependencies(acupoint3d_display_node        ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} )
target_link_libraries(acupoint3d_display_node ${OpenCV_LIBS} ${catkin_LIBRARIES} ${PCL_LIBRARIES})


add_executable(acupoint_rviz_display src/debug/acupoint_rviz_display)
add_dependencies(acupoint_rviz_display        ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} )
target_link_libraries(acupoint_rviz_display ${OpenCV_LIBS} ${catkin_LIBRARIES} ${PCL_LIBRARIES})

add_executable(acupoint_pixel_debug_node src/debug/acupoint_pixel_debug_node.cpp)
add_dependencies(acupoint_pixel_debug_node        ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} )
target_link_libraries(acupoint_pixel_debug_node ${OpenCV_LIBS} ${catkin_LIBRARIES} )

add_executable(acupoint_coordinate_debug_node src/debug/acupoint_coordinate_debug_node.cpp)
add_dependencies(acupoint_coordinate_debug_node        ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} )
target_link_libraries(acupoint_coordinate_debug_node ${OpenCV_LIBS} ${catkin_LIBRARIES} )